import java.io.*;

/**
 * ThreadSafeWriter is a simple thread safe wrapper for the PrintWriter class
 * which may not be thread safe.
 * <p>
 * Limitations: Only the methods & constructors that I actually use are 
 * overloaded.
 *
 * @author David Gardner
 * @see PrintWriter
 */
public class ThreadSafeWriter extends PrintWriter {
  ThreadSafeWriter (OutputStream out, boolean autoFlush) {
    super (out, autoFlush);
  }	       
	
  public synchronized void write (char[] buf) {
    super.write(buf);
  }

  public synchronized void write (int c) {
    super.write(c);
  }
  
  public synchronized void write (String s) {
    super.write (s);
  }

  public synchronized void flush () {
    super.flush();
  }
  
  public synchronized boolean checkError () {
      return super.checkError();
  }
}
